#include "TcpServer.h"
#include "const.h"
#include <exception>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main()
{

    const unsigned short PORT = 8000;

    chdir(WORKSPACE_PATH.c_str());

    // 启动服务器
    try {
        TcpServer* server = new TcpServer(PORT, 6);
        server->run();
    }
    catch (const std::exception& e) {
        printf("error: %s", e.what());
    }

    return 0;
}